package org.jample.poi.bean;

import java.util.HashMap;
import java.util.Map;

public class FactorData {

    Map<String, Map<String, Double>> data = new HashMap<String, Map<String, Double>>();

    public void set(String key, Map<String, Double> value) {
        data.put(key, value);
    }

    public Map<String, Double> get(String key) {
        return data.get(key);
    }

    @Override
    public String toString(){
        StringBuffer buf = new StringBuffer();
        for(Map.Entry<String, Map<String,Double>> entry:data.entrySet()){
            buf.append(entry.getKey()).append("\t");
            for(Map.Entry<String, Double> value:entry.getValue().entrySet()){
                buf.append(value.getKey()+"("+value.getValue()+")").append("\t");
            }
            buf.append("\r\n");
        }
        return buf.toString();
    }
    
}
